<template>
  <div class="no-data-wrap flex justify-center items-center flex-column">
    <SvgIcon :style="{ color, fontSize: size + 'px' }" icon="empty-data" />
    <span class="tc text" v-if="text">{{ text }}</span>
  </div>
</template>

<script>
import SvgIcon from '@/components/base/SvgIcon/SvgIcon.vue'
export default {
  name: 'NoData',
  components: { SvgIcon },
  props: {
    size: {
      type: [Number, String],
      default: 150
    },
    color: {
      type: String,
      default: '#cdcdcd'
    },
    text: {
      type: String,
      default: '暂无数据'
    }
  }
}
</script>

<style lang="less" scoped>
.no-data-wrap {
  height: 100%;
  .text {
    color: @colorText-2;
    font-size: 14px;
    padding: 10px 0;
  }
}
</style>
